AI Verified

Name

Set Tax status as none by default when creating a new product

Language

PHP

Rating

Voted: 0 by 0 user(s)

Codevault

Totalweb AS

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: Not Specified

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

13/11/2022

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Set Tax status as none by default when creating a new product

 
                    
1add_action('woocommerce_product_options_tax', 'new_product_tax_status_none');
2function new_product_tax_status_none()
3{
4 global $post, $pagenow;
5 
6 // Only on new product pages
7 if( $pagenow === 'post-new.php' ) :
8 ?>
9 <script>
10 jQuery(function($){
11 // On load set the tax status to none
12 $('select[name="_tax_status"]').val('none');
13 });
14 </script>
15 <?php
16 endif;
17}

0

Related Snippets

Please see some snippets below related to this snippet..

WooCommerce

AI Verified

0

WooCommerce Fixed Checkout Admin/Handling Fee

Added: 1 year ago

Last Updated: 1 year ago

A little warning, unexpected fees at checkout can put some users off and some payment gateways do not allow custom additional fees. Passing on fees and surcharges may not be legal in your location so...

WooCommerce

AI Verified

1

WooCommerce Show Product Unit Price

Added: 1 year ago

Last Updated: 1 day ago

By default, WooCommerce only shows the product’s unit price (or price per item) only on the cart page. On the Checkout, Thank You page, Emails, and order view in My Account, the user is not shown the...

WooCommerce

AI Verified

0

WooCommerce Subscribe To Emails Checkbox On Checkout

Added: 1 year ago

Last Updated: 1 year ago

Asking users to subscribe to your emails on the checkout page is the perfect place to begin remarketing your store and products to advocates. A paying customer doesn’t need as much convincing to buy a...

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WordPress Admin

AI Verified

3

Remove the site health dashboard widget

Added: 1 year ago

Last Updated: 1 day ago

WordPress Admin

AI Verified

2

Remove admin nags

Added: 1 year ago

Last Updated: 1 year ago

Custom function to remove admin notices (remember to edit the classes)

WooCommerce

AI Verified

1

Woocommerce - Remove the additional information tab

Added: 1 year ago

Last Updated: 1 day ago